#ifndef __GPRSSTATEMCH_H__
#define __GPRSSTATEMCH_H__
#include "stm32f10x.h"

typedef enum
{
	has_been_answer,
	has_been_hungup,
	need_answer
}AnswerOrHungup;

typedef struct
{
	u8 TelNumber[20];
}RingInfo;

typedef enum
{
	InitState=0,
	CheckSimState,
	SearchNetCREGState,
	SearchNetCGREGState,
	AccessSvrState,
	WaitLinkSvrResState,
	SvrLinkOkState,
	
	CallState1,
	CallState2,
	
	RingState,
	
	ReStartState,
/************************/
	UselessState=-0xff,    
}GprsState;
typedef GprsState(*GprsStateMachine)(GprsState *);

typedef u8(*GprsInitFunc_T)(void);



extern GprsStateMachine GprsStateMch[];

GprsState InitStateFunc(GprsState *StateFrom);
GprsState CheckSimStateFunc(GprsState *StateFrom);
GprsState SearchNetCREGStateFunc(GprsState *StateFrom);
GprsState SearchNetCGREGStateFunc(GprsState *StateFrom);
GprsState ReStartStateFunc(GprsState *StateFrom);
GprsState AccessSvrStateFunc(GprsState *StateFrom);
GprsState SvrLinkOkStateFunc(GprsState *StateFrom);
GprsState WaitLinkSvrResStateFunc(GprsState *StateFrom);
GprsState CallState2Func(GprsState *StateFrom);
GprsState RingStateFunc(GprsState *StateFrom);

GprsState CallState1Func(GprsState *StateFrom);
#endif


